#!/bin/sh

AB_PATH="/usr/qnx630/host/qnx6/x86/usr/photon/appbuilder"
AB_INC_PATH="/usr/qnx630/target/qnx6/usr/include"
AB_LIB_PATH="/usr/qnx630/target/qnx6/x86/usr/lib"
WG_PATH="/proj4/CwTrend"
WG_NAME="CwTrend"

rm $AB_LIB_PATH/lib$WG_NAME.*
rm /usr/lib/lib$WG_NAME.*
rm $AB_INC_PATH/photon/$WG_NAME.h
rm $AB_PATH/$WG_NAME.pal
rm $AB_PATH/templates/$WG_NAME
rm $AB_PATH/templates/$WG_NAME.img

cd $AB_PATH

awk "{if (match(\$0, \"$WG_NAME\") == 0) print \$0}" abpal.def > abpal.def.1
rm abpal.def
mv abpal.def.1 abpal.def

awk "{if (match(\$0, \"$WG_NAME\") == 0) print \$0}" palette.def > palette.def.1
rm palette.def
mv palette.def.1 palette.def

exit 0